<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>mouseEnabled_mouseChildren</title>
		<script type="text/javascript" src="../load_lufylegend.js"></script>
		<script type="text/javascript" src="../../../src/display/LSprite.js"></script>
	</head>
	<body>
		<div id="legend"></div>
		<script>
			LInit(20, "legend", 800, 280, main);
			function main() {
				LGlobal.setDebug(true);
				var parentLayer = new LSprite();
				parentLayer.x = parentLayer.y = 20;
				var child = new LSprite();
				child.graphics.drawRect(2, "#ff0000", [10, 10, 50, 100], true, "#880088");
				parentLayer.mouseEnabled = false;
				parentLayer.mouseChildren = true;
				addChild(parentLayer);
				parentLayer.addChild(child);

				child.addEventListener(LMouseEvent.MOUSE_DOWN, function(e) {
					trace("child clicked");
				});
				parentLayer.addEventListener(LMouseEvent.MOUSE_DOWN, function(e) {
					trace("parentLayer clicked");
				});
			}
		</script>
	</body>
</html>